package org.catspaw.cherubim.persistence.dao.jdbc;

import org.catspaw.cherubim.persistence.dao.UpdateDao;
import org.catspaw.cherubim.persistence.jdbc.DefaultConnectionManager;
import org.catspaw.cherubim.persistence.jdbc.dbutils.SqlExecutor;

public class UpdateJdbcDao implements UpdateDao {

	private SqlExecutor	executor;

	public UpdateJdbcDao() {
		this.executor = new SqlExecutor(new DefaultConnectionManager());
	}

	public UpdateJdbcDao(SqlExecutor executor) {
		this.executor = executor;
	}

	public Object update(String sql, Object... params) {
		return executor.update(sql, params);
	}

	public Object batch(String sql, Object[][] params) {
		return executor.batch(sql, params);
	}

	public Object batch(String sql, Object[][] params, int batchSize) {
		return executor.batch(sql, params);
	}
}
